package com.szz.cardecision.mapper;

import com.szz.cardecision.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Optional;

@Mapper
public interface UserMapper {
    Optional<User> findByUsername(@Param("username") String username);
    Optional<User> findById(@Param("id") Long id);
    List<User> findAll();

    int insert(User user);
    int update(User user);
    int deleteById(@Param("id") Long id);
}